JavaScript How to loop through unique values of nested object

welcome to shbcf.ru